package com.example.demo.processor;

import com.example.demo.annotation.OrderProcessor;
import com.example.demo.enums.OrderStatusEnum;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

/**
 * @author zhy
 * @version 1.0.0
 * @ClassName CreateOrderProcessor.java
 * @Description TODO
 * @createTime 2020年12月02日 15:07:00
 */
@Component
@OrderProcessor
public class CreateOrderProcessor extends AbstractOrderProcessor {

    private Logger logger = LoggerFactory.getLogger(CreateOrderProcessor.class);

    public CreateOrderProcessor() {
        super.setStatus(OrderStatusEnum.CREATE_EVENT.status);
    }

    @Override
    public boolean process(String orderId, Object... params) {
        // TODO 创建订单/取消订单，mq发送，等等
        logger.info("进入创建订单后处理器");
        return true;
    }
}
